package com.alks.function.data.vo.finance.lotcost;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alks.common.utils.BigDecimalUtil;
import com.alks.common.utils.excelUtils.nestExcel.annotation.NestExcelProperty;
import com.alks.common.utils.excelUtils.nestExcel.convert.DateConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author: chen
 * @date: 2024/12/20
 * @description: 指令成本分析列表VO
 */
@Data
@ApiModel(value = "指令成本分析列表VO")
public class LotCostAnalysisListVO {

    @NestExcelProperty(name = "品牌")
    private String custom;

    @NestExcelProperty(name = "鞋图")
    private String photoName;

    @NestExcelProperty(name = "指令")
    private String lotNo;

    @NestExcelProperty(name = "型体")
    private String style;

    @NestExcelProperty(name = "颜色")
    private String color;

    @NestExcelProperty(name = "订单数")
    private Integer orderQty;

    @NestExcelProperty(name = "出货欠数")
    private Integer unexpQty;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NestExcelProperty(name = "下单日期")
    @ExcelProperty(converter = DateConvert.class)
    private LocalDateTime orderDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NestExcelProperty(name = "客户交期")
    @ExcelProperty(converter = DateConvert.class)
    private LocalDateTime deliveryDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NestExcelProperty(name = "出货日期")
    @ExcelProperty(converter = DateConvert.class)
    private LocalDateTime exportDate;

    @NestExcelProperty(name = "指令成本")
    private BigDecimal costAmt;

    @NestExcelProperty(name = "资料状态")
    private String status;

    public BigDecimal getCostAmt() {
        return BigDecimalUtil.numberScale(costAmt, 3);
    }
}
